{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tensorwatch as tw\n",
    "import torchvision.models"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: %3 Pages: 1 -->\r\n",
       "<svg width=\"387pt\" height=\"1403pt\"\r\n",
       " viewBox=\"0.00 0.00 387.00 1403.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(72 1331)\">\r\n",
       "<title>%3</title>\r\n",
       "<polygon fill=\"#ffffff\" stroke=\"none\" points=\"-72,72 -72,-1331 315,-1331 315,72 -72,72\"/>\r\n",
       "<!-- AlexNet/Sequential[features]/MaxPool2d[2]/outputs/19 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>AlexNet/Sequential[features]/MaxPool2d[2]/outputs/19</title>\r\n",
       "<g id=\"a_node1\"><a xlink:title=\"{&#x27;kernel_shape&#x27;: [3, 3], &#x27;pads&#x27;: [0, 0, 0, 0], &#x27;strides&#x27;: [2, 2]}\">\r\n",
       "<polygon fill=\"#8de5a1\" stroke=\"#7c96bc\" points=\"188,-1176 114,-1176 114,-1140 188,-1140 188,-1176\"/>\r\n",
       "<text text-anchor=\"start\" x=\"122\" y=\"-1155\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">MaxPool3x3</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- 14801076373261662144 -->\r\n",
       "<g id=\"node16\" class=\"node\"><title>14801076373261662144</title>\r\n",
       "<g id=\"a_node16\"><a xlink:title=\"{&#x27;dilations&#x27;: [1, 1], &#x27;group&#x27;: 1, &#x27;kernel_shape&#x27;: [5, 5], &#x27;pads&#x27;: [2, 2, 2, 2], &#x27;strides&#x27;: [1, 1]}\">\r\n",
       "<polygon fill=\"#a1c9f4\" stroke=\"#7c96bc\" points=\"197.5,-1093 104.5,-1093 104.5,-1057 197.5,-1057 197.5,-1093\"/>\r\n",
       "<text text-anchor=\"start\" x=\"113\" y=\"-1072\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Conv5x5 &gt; Relu</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/Sequential[features]/MaxPool2d[2]/outputs/19&#45;&gt;14801076373261662144 -->\r\n",
       "<g id=\"edge12\" class=\"edge\"><title>AlexNet/Sequential[features]/MaxPool2d[2]/outputs/19&#45;&gt;14801076373261662144</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M151,-1139.82C151,-1129.19 151,-1115.31 151,-1103.2\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"154.5,-1103.15 151,-1093.15 147.5,-1103.15 154.5,-1103.15\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"182\" y=\"-1114\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\"> 1x64x27x27</text>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/Sequential[features]/MaxPool2d[5]/outputs/22 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>AlexNet/Sequential[features]/MaxPool2d[5]/outputs/22</title>\r\n",
       "<g id=\"a_node2\"><a xlink:title=\"{&#x27;kernel_shape&#x27;: [3, 3], &#x27;pads&#x27;: [0, 0, 0, 0], &#x27;strides&#x27;: [2, 2]}\">\r\n",
       "<polygon fill=\"#8de5a1\" stroke=\"#7c96bc\" points=\"188,-1010 114,-1010 114,-974 188,-974 188,-1010\"/>\r\n",
       "<text text-anchor=\"start\" x=\"122\" y=\"-989\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">MaxPool3x3</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- 5865823969538149621 -->\r\n",
       "<g id=\"node19\" class=\"node\"><title>5865823969538149621</title>\r\n",
       "<g id=\"a_node19\"><a xlink:title=\"{&#x27;dilations&#x27;: [1, 1], &#x27;group&#x27;: 1, &#x27;kernel_shape&#x27;: [3, 3], &#x27;pads&#x27;: [1, 1, 1, 1], &#x27;strides&#x27;: [1, 1]}\">\r\n",
       "<polygon fill=\"#a1c9f4\" stroke=\"#7c96bc\" points=\"197.5,-927 104.5,-927 104.5,-883 197.5,-883 197.5,-927\"/>\r\n",
       "<text text-anchor=\"start\" x=\"113\" y=\"-911\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Conv3x3 &gt; Relu</text>\r\n",
       "<text text-anchor=\"start\" x=\"182\" y=\"-890\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">x3</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/Sequential[features]/MaxPool2d[5]/outputs/22&#45;&gt;5865823969538149621 -->\r\n",
       "<g id=\"edge18\" class=\"edge\"><title>AlexNet/Sequential[features]/MaxPool2d[5]/outputs/22&#45;&gt;5865823969538149621</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M151,-973.799C151,-963.369 151,-949.742 151,-937.443\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"154.5,-937.09 151,-927.09 147.5,-937.09 154.5,-937.09\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"185\" y=\"-948\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\"> 1x192x13x13</text>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/Sequential[features]/MaxPool2d[12]/outputs/29 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>AlexNet/Sequential[features]/MaxPool2d[12]/outputs/29</title>\r\n",
       "<g id=\"a_node3\"><a xlink:title=\"{&#x27;kernel_shape&#x27;: [3, 3], &#x27;pads&#x27;: [0, 0, 0, 0], &#x27;strides&#x27;: [2, 2]}\">\r\n",
       "<polygon fill=\"#8de5a1\" stroke=\"#7c96bc\" points=\"188,-836 114,-836 114,-800 188,-800 188,-836\"/>\r\n",
       "<text text-anchor=\"start\" x=\"122\" y=\"-815\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">MaxPool3x3</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/outputs/31 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>AlexNet/outputs/31</title>\r\n",
       "<polygon fill=\"#d0bbff\" stroke=\"#7c96bc\" points=\"147,-753 93,-753 93,-717 147,-717 147,-753\"/>\r\n",
       "<text text-anchor=\"start\" x=\"105\" y=\"-732\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Shape</text>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/Sequential[features]/MaxPool2d[12]/outputs/29&#45;&gt;AlexNet/outputs/31 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>AlexNet/Sequential[features]/MaxPool2d[12]/outputs/29&#45;&gt;AlexNet/outputs/31</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M129.203,-799.762C124.256,-794.629 119.675,-788.594 117,-782 114.648,-776.204 114.012,-769.66 114.263,-763.364\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"117.769,-763.501 115.377,-753.179 110.811,-762.74 117.769,-763.501\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"145\" y=\"-774\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\"> 1x256x6x6</text>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/outputs/37 -->\r\n",
       "<g id=\"node11\" class=\"node\"><title>AlexNet/outputs/37</title>\r\n",
       "<polygon fill=\"#fffea3\" stroke=\"#7c96bc\" points=\"194,-451 136,-451 136,-415 194,-415 194,-451\"/>\r\n",
       "<text text-anchor=\"start\" x=\"144\" y=\"-430\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Reshape</text>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/Sequential[features]/MaxPool2d[12]/outputs/29&#45;&gt;AlexNet/outputs/37 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>AlexNet/Sequential[features]/MaxPool2d[12]/outputs/29&#45;&gt;AlexNet/outputs/37</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M163.591,-799.957C173.972,-784.197 187,-759.699 187,-736 187,-736 187,-736 187,-505 187,-489.781 182.331,-473.515 177.294,-460.398\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"180.489,-458.962 173.443,-451.05 174.016,-461.629 180.489,-458.962\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"215\" y=\"-618\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\"> 1x256x6x6</text>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/outputs/30 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>AlexNet/outputs/30</title>\r\n",
       "<g id=\"a_node4\"><a xlink:title=\"{&#x27;value&#x27;: tensor(0)}\">\r\n",
       "<polygon fill=\"#ff9f9b\" stroke=\"#7c96bc\" points=\"75,-753 13,-753 13,-717 75,-717 75,-753\"/>\r\n",
       "<text text-anchor=\"start\" x=\"21\" y=\"-732\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Constant</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/outputs/32 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>AlexNet/outputs/32</title>\r\n",
       "<g id=\"a_node6\"><a xlink:title=\"{&#x27;axis&#x27;: 0}\">\r\n",
       "<polygon fill=\"#debb9b\" stroke=\"#7c96bc\" points=\"147,-680 93,-680 93,-644 147,-644 147,-680\"/>\r\n",
       "<text text-anchor=\"start\" x=\"103\" y=\"-659\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Gather</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/outputs/30&#45;&gt;AlexNet/outputs/32 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>AlexNet/outputs/30&#45;&gt;AlexNet/outputs/32</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M62.3975,-716.813C72.0128,-707.83 83.9339,-696.693 94.4323,-686.886\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"96.8539,-689.413 101.772,-680.029 92.0752,-684.298 96.8539,-689.413\"/>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/outputs/31&#45;&gt;AlexNet/outputs/32 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>AlexNet/outputs/31&#45;&gt;AlexNet/outputs/32</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M120,-716.813C120,-708.789 120,-699.047 120,-690.069\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"123.5,-690.029 120,-680.029 116.5,-690.029 123.5,-690.029\"/>\r\n",
       "</g>\r\n",
       "<!-- /outputs/34 -->\r\n",
       "<g id=\"node8\" class=\"node\"><title>/outputs/34</title>\r\n",
       "<g id=\"a_node8\"><a xlink:title=\"{&#x27;axes&#x27;: [0]}\">\r\n",
       "<polygon fill=\"#bcd6fc\" stroke=\"#7c96bc\" points=\"158,-597 88,-597 88,-561 158,-561 158,-597\"/>\r\n",
       "<text text-anchor=\"start\" x=\"96\" y=\"-576\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Unsqueeze</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/outputs/32&#45;&gt;/outputs/34 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>AlexNet/outputs/32&#45;&gt;/outputs/34</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M120.636,-643.822C121.03,-633.19 121.544,-619.306 121.992,-607.204\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"125.492,-607.276 122.365,-597.153 118.497,-607.017 125.492,-607.276\"/>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/outputs/33 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>AlexNet/outputs/33</title>\r\n",
       "<g id=\"a_node7\"><a xlink:title=\"{&#x27;value&#x27;: tensor(9216)}\">\r\n",
       "<polygon fill=\"#ff9f9b\" stroke=\"#7c96bc\" points=\"66,-680 4,-680 4,-644 66,-644 66,-680\"/>\r\n",
       "<text text-anchor=\"start\" x=\"12\" y=\"-659\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Constant</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- /outputs/35 -->\r\n",
       "<g id=\"node9\" class=\"node\"><title>/outputs/35</title>\r\n",
       "<g id=\"a_node9\"><a xlink:title=\"{&#x27;axes&#x27;: [0]}\">\r\n",
       "<polygon fill=\"#bcd6fc\" stroke=\"#7c96bc\" points=\"70,-597 0,-597 0,-561 70,-561 70,-597\"/>\r\n",
       "<text text-anchor=\"start\" x=\"8\" y=\"-576\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Unsqueeze</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/outputs/33&#45;&gt;/outputs/35 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>AlexNet/outputs/33&#45;&gt;/outputs/35</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M35,-643.822C35,-633.19 35,-619.306 35,-607.204\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"38.5001,-607.153 35,-597.153 31.5001,-607.153 38.5001,-607.153\"/>\r\n",
       "</g>\r\n",
       "<!-- /outputs/36 -->\r\n",
       "<g id=\"node10\" class=\"node\"><title>/outputs/36</title>\r\n",
       "<g id=\"a_node10\"><a xlink:title=\"{&#x27;axis&#x27;: 0}\">\r\n",
       "<polygon fill=\"#d0bbff\" stroke=\"#7c96bc\" points=\"150,-524 96,-524 96,-488 150,-488 150,-524\"/>\r\n",
       "<text text-anchor=\"start\" x=\"105\" y=\"-503\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Concat</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- /outputs/34&#45;&gt;/outputs/36 -->\r\n",
       "<g id=\"edge7\" class=\"edge\"><title>/outputs/34&#45;&gt;/outputs/36</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M123,-560.813C123,-552.789 123,-543.047 123,-534.069\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"126.5,-534.029 123,-524.029 119.5,-534.029 126.5,-534.029\"/>\r\n",
       "</g>\r\n",
       "<!-- /outputs/35&#45;&gt;/outputs/36 -->\r\n",
       "<g id=\"edge8\" class=\"edge\"><title>/outputs/35&#45;&gt;/outputs/36</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M56.3023,-560.813C67.652,-551.656 81.7763,-540.26 94.1015,-530.316\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"96.3088,-533.032 101.894,-524.029 91.9133,-527.584 96.3088,-533.032\"/>\r\n",
       "</g>\r\n",
       "<!-- /outputs/36&#45;&gt;AlexNet/outputs/37 -->\r\n",
       "<g id=\"edge9\" class=\"edge\"><title>/outputs/36&#45;&gt;AlexNet/outputs/37</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M133.167,-487.813C138.12,-479.441 144.179,-469.197 149.677,-459.903\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"152.848,-461.418 154.927,-451.029 146.823,-457.854 152.848,-461.418\"/>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/Sequential[classifier]/Dropout[0]/outputs/38/39 -->\r\n",
       "<g id=\"node12\" class=\"node\"><title>AlexNet/Sequential[classifier]/Dropout[0]/outputs/38/39</title>\r\n",
       "<g id=\"a_node12\"><a xlink:title=\"{&#x27;ratio&#x27;: 0.5}\">\r\n",
       "<polygon fill=\"#b9f2f0\" stroke=\"#7c96bc\" points=\"202.5,-368 127.5,-368 127.5,-332 202.5,-332 202.5,-368\"/>\r\n",
       "<text text-anchor=\"start\" x=\"136\" y=\"-347\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Dropout 0.5</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/outputs/37&#45;&gt;AlexNet/Sequential[classifier]/Dropout[0]/outputs/38/39 -->\r\n",
       "<g id=\"edge10\" class=\"edge\"><title>AlexNet/outputs/37&#45;&gt;AlexNet/Sequential[classifier]/Dropout[0]/outputs/38/39</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M165,-414.822C165,-404.19 165,-390.306 165,-378.204\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"168.5,-378.153 165,-368.153 161.5,-378.153 168.5,-378.153\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"185\" y=\"-389\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\"> 1x9216</text>\r\n",
       "</g>\r\n",
       "<!-- 1726964663638476971 -->\r\n",
       "<g id=\"node17\" class=\"node\"><title>1726964663638476971</title>\r\n",
       "<g id=\"a_node17\"><a xlink:title=\"{&#x27;alpha&#x27;: 1.0, &#x27;beta&#x27;: 1.0, &#x27;transB&#x27;: 1}\">\r\n",
       "<polygon fill=\"#8de5a1\" stroke=\"#7c96bc\" points=\"205,-285 125,-285 125,-249 205,-249 205,-285\"/>\r\n",
       "<text text-anchor=\"start\" x=\"133\" y=\"-264\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Linear &gt; Relu</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/Sequential[classifier]/Dropout[0]/outputs/38/39&#45;&gt;1726964663638476971 -->\r\n",
       "<g id=\"edge14\" class=\"edge\"><title>AlexNet/Sequential[classifier]/Dropout[0]/outputs/38/39&#45;&gt;1726964663638476971</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M165,-331.822C165,-321.19 165,-307.306 165,-295.204\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"168.5,-295.153 165,-285.153 161.5,-295.153 168.5,-295.153\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"185\" y=\"-306\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\"> 1x9216</text>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/Sequential[classifier]/Dropout[3]/outputs/42/43 -->\r\n",
       "<g id=\"node13\" class=\"node\"><title>AlexNet/Sequential[classifier]/Dropout[3]/outputs/42/43</title>\r\n",
       "<g id=\"a_node13\"><a xlink:title=\"{&#x27;ratio&#x27;: 0.5}\">\r\n",
       "<polygon fill=\"#b9f2f0\" stroke=\"#7c96bc\" points=\"202.5,-202 127.5,-202 127.5,-166 202.5,-166 202.5,-202\"/>\r\n",
       "<text text-anchor=\"start\" x=\"136\" y=\"-181\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Dropout 0.5</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- 11430778542177007743 -->\r\n",
       "<g id=\"node18\" class=\"node\"><title>11430778542177007743</title>\r\n",
       "<g id=\"a_node18\"><a xlink:title=\"{&#x27;alpha&#x27;: 1.0, &#x27;beta&#x27;: 1.0, &#x27;transB&#x27;: 1}\">\r\n",
       "<polygon fill=\"#8de5a1\" stroke=\"#7c96bc\" points=\"205,-119 125,-119 125,-83 205,-83 205,-119\"/>\r\n",
       "<text text-anchor=\"start\" x=\"133\" y=\"-98\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Linear &gt; Relu</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/Sequential[classifier]/Dropout[3]/outputs/42/43&#45;&gt;11430778542177007743 -->\r\n",
       "<g id=\"edge16\" class=\"edge\"><title>AlexNet/Sequential[classifier]/Dropout[3]/outputs/42/43&#45;&gt;11430778542177007743</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M165,-165.822C165,-155.19 165,-141.306 165,-129.204\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"168.5,-129.153 165,-119.153 161.5,-129.153 168.5,-129.153\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"185\" y=\"-140\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\"> 1x4096</text>\r\n",
       "</g>\r\n",
       "<!-- AlexNet/Sequential[classifier]/ReLU[5]/outputs/46 -->\r\n",
       "<g id=\"node14\" class=\"node\"><title>AlexNet/Sequential[classifier]/ReLU[5]/outputs/46</title>\r\n",
       "<g id=\"a_node14\"><a xlink:title=\"{&#x27;alpha&#x27;: 1.0, &#x27;beta&#x27;: 1.0, &#x27;transB&#x27;: 1}\">\r\n",
       "<polygon fill=\"#4878d0\" stroke=\"#7c96bc\" points=\"192,-36 138,-36 138,-0 192,-0 192,-36\"/>\r\n",
       "<text text-anchor=\"start\" x=\"150\" y=\"-15\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Linear</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- 17346822537251554369 -->\r\n",
       "<g id=\"node15\" class=\"node\"><title>17346822537251554369</title>\r\n",
       "<g id=\"a_node15\"><a xlink:title=\"{&#x27;dilations&#x27;: [1, 1], &#x27;group&#x27;: 1, &#x27;kernel_shape&#x27;: [11, 11], &#x27;pads&#x27;: [2, 2, 2, 2], &#x27;strides&#x27;: [4, 4]}\">\r\n",
       "<polygon fill=\"#a1c9f4\" stroke=\"#7c96bc\" points=\"203.5,-1259 98.5,-1259 98.5,-1223 203.5,-1223 203.5,-1259\"/>\r\n",
       "<text text-anchor=\"start\" x=\"107\" y=\"-1238\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\">Conv11x11 &gt; Relu</text>\r\n",
       "</a>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "<!-- 17346822537251554369&#45;&gt;AlexNet/Sequential[features]/MaxPool2d[2]/outputs/19 -->\r\n",
       "<g id=\"edge11\" class=\"edge\"><title>17346822537251554369&#45;&gt;AlexNet/Sequential[features]/MaxPool2d[2]/outputs/19</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M151,-1222.82C151,-1212.19 151,-1198.31 151,-1186.2\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"154.5,-1186.15 151,-1176.15 147.5,-1186.15 154.5,-1186.15\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"182\" y=\"-1197\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\"> 1x64x55x55</text>\r\n",
       "</g>\r\n",
       "<!-- 14801076373261662144&#45;&gt;AlexNet/Sequential[features]/MaxPool2d[5]/outputs/22 -->\r\n",
       "<g id=\"edge13\" class=\"edge\"><title>14801076373261662144&#45;&gt;AlexNet/Sequential[features]/MaxPool2d[5]/outputs/22</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M151,-1056.82C151,-1046.19 151,-1032.31 151,-1020.2\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"154.5,-1020.15 151,-1010.15 147.5,-1020.15 154.5,-1020.15\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"185\" y=\"-1031\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\"> 1x192x27x27</text>\r\n",
       "</g>\r\n",
       "<!-- 1726964663638476971&#45;&gt;AlexNet/Sequential[classifier]/Dropout[3]/outputs/42/43 -->\r\n",
       "<g id=\"edge15\" class=\"edge\"><title>1726964663638476971&#45;&gt;AlexNet/Sequential[classifier]/Dropout[3]/outputs/42/43</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M165,-248.822C165,-238.19 165,-224.306 165,-212.204\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"168.5,-212.153 165,-202.153 161.5,-212.153 168.5,-212.153\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"185\" y=\"-223\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\"> 1x4096</text>\r\n",
       "</g>\r\n",
       "<!-- 11430778542177007743&#45;&gt;AlexNet/Sequential[classifier]/ReLU[5]/outputs/46 -->\r\n",
       "<g id=\"edge17\" class=\"edge\"><title>11430778542177007743&#45;&gt;AlexNet/Sequential[classifier]/ReLU[5]/outputs/46</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M165,-82.822C165,-72.1903 165,-58.306 165,-46.2035\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"168.5,-46.1532 165,-36.1533 161.5,-46.1533 168.5,-46.1532\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"185\" y=\"-57\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\"> 1x4096</text>\r\n",
       "</g>\r\n",
       "<!-- 5865823969538149621&#45;&gt;AlexNet/Sequential[features]/MaxPool2d[12]/outputs/29 -->\r\n",
       "<g id=\"edge19\" class=\"edge\"><title>5865823969538149621&#45;&gt;AlexNet/Sequential[features]/MaxPool2d[12]/outputs/29</title>\r\n",
       "<path fill=\"none\" stroke=\"#7c96bc\" d=\"M151,-882.989C151,-871.923 151,-858.219 151,-846.336\"/>\r\n",
       "<polygon fill=\"#7c96bc\" stroke=\"#7c96bc\" points=\"154.5,-846.062 151,-836.062 147.5,-846.062 154.5,-846.062\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"185\" y=\"-857\" font-family=\"Verdana\" font-size=\"10.00\" fill=\"#202020\"> 1x256x13x13</text>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<tensorwatch.model_graph.hiddenlayer.graph.Graph at 0x203248ed630>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alexnet_model = torchvision.models.alexnet()\n",
    "tw.draw_model(alexnet_model, [1, 3, 224, 224])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[MAdd]: Dropout is not supported!\n",
      "[Flops]: Dropout is not supported!\n",
      "[Memory]: Dropout is not supported!\n",
      "[MAdd]: Dropout is not supported!\n",
      "[Flops]: Dropout is not supported!\n",
      "[Memory]: Dropout is not supported!\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>module name</th>\n",
       "      <th>input shape</th>\n",
       "      <th>output shape</th>\n",
       "      <th>params</th>\n",
       "      <th>memory(MB)</th>\n",
       "      <th>MAdd</th>\n",
       "      <th>Flops</th>\n",
       "      <th>MemRead(B)</th>\n",
       "      <th>MemWrite(B)</th>\n",
       "      <th>duration[%]</th>\n",
       "      <th>MemR+W(B)</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>features.0</td>\n",
       "      <td>3 224 224</td>\n",
       "      <td>64  55  55</td>\n",
       "      <td>23296.0</td>\n",
       "      <td>0.74</td>\n",
       "      <td>140,553,600.0</td>\n",
       "      <td>70,470,400.0</td>\n",
       "      <td>695296.0</td>\n",
       "      <td>774400.0</td>\n",
       "      <td>7.04%</td>\n",
       "      <td>1469696.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>features.1</td>\n",
       "      <td>64  55  55</td>\n",
       "      <td>64  55  55</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.74</td>\n",
       "      <td>193,600.0</td>\n",
       "      <td>193,600.0</td>\n",
       "      <td>774400.0</td>\n",
       "      <td>774400.0</td>\n",
       "      <td>2.82%</td>\n",
       "      <td>1548800.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>features.2</td>\n",
       "      <td>64  55  55</td>\n",
       "      <td>64  27  27</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.18</td>\n",
       "      <td>373,248.0</td>\n",
       "      <td>193,600.0</td>\n",
       "      <td>774400.0</td>\n",
       "      <td>186624.0</td>\n",
       "      <td>7.03%</td>\n",
       "      <td>961024.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>features.3</td>\n",
       "      <td>64  27  27</td>\n",
       "      <td>192  27  27</td>\n",
       "      <td>307392.0</td>\n",
       "      <td>0.53</td>\n",
       "      <td>447,897,600.0</td>\n",
       "      <td>224,088,768.0</td>\n",
       "      <td>1416192.0</td>\n",
       "      <td>559872.0</td>\n",
       "      <td>12.67%</td>\n",
       "      <td>1976064.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>features.4</td>\n",
       "      <td>192  27  27</td>\n",
       "      <td>192  27  27</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.53</td>\n",
       "      <td>139,968.0</td>\n",
       "      <td>139,968.0</td>\n",
       "      <td>559872.0</td>\n",
       "      <td>559872.0</td>\n",
       "      <td>2.82%</td>\n",
       "      <td>1119744.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>features.5</td>\n",
       "      <td>192  27  27</td>\n",
       "      <td>192  13  13</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.12</td>\n",
       "      <td>259,584.0</td>\n",
       "      <td>139,968.0</td>\n",
       "      <td>559872.0</td>\n",
       "      <td>129792.0</td>\n",
       "      <td>5.63%</td>\n",
       "      <td>689664.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>features.6</td>\n",
       "      <td>192  13  13</td>\n",
       "      <td>384  13  13</td>\n",
       "      <td>663936.0</td>\n",
       "      <td>0.25</td>\n",
       "      <td>224,280,576.0</td>\n",
       "      <td>112,205,184.0</td>\n",
       "      <td>2785536.0</td>\n",
       "      <td>259584.0</td>\n",
       "      <td>5.63%</td>\n",
       "      <td>3045120.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>features.7</td>\n",
       "      <td>384  13  13</td>\n",
       "      <td>384  13  13</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.25</td>\n",
       "      <td>64,896.0</td>\n",
       "      <td>64,896.0</td>\n",
       "      <td>259584.0</td>\n",
       "      <td>259584.0</td>\n",
       "      <td>1.41%</td>\n",
       "      <td>519168.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>features.8</td>\n",
       "      <td>384  13  13</td>\n",
       "      <td>256  13  13</td>\n",
       "      <td>884992.0</td>\n",
       "      <td>0.17</td>\n",
       "      <td>299,040,768.0</td>\n",
       "      <td>149,563,648.0</td>\n",
       "      <td>3799552.0</td>\n",
       "      <td>173056.0</td>\n",
       "      <td>8.44%</td>\n",
       "      <td>3972608.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>features.9</td>\n",
       "      <td>256  13  13</td>\n",
       "      <td>256  13  13</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.17</td>\n",
       "      <td>43,264.0</td>\n",
       "      <td>43,264.0</td>\n",
       "      <td>173056.0</td>\n",
       "      <td>173056.0</td>\n",
       "      <td>0.00%</td>\n",
       "      <td>346112.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>features.10</td>\n",
       "      <td>256  13  13</td>\n",
       "      <td>256  13  13</td>\n",
       "      <td>590080.0</td>\n",
       "      <td>0.17</td>\n",
       "      <td>199,360,512.0</td>\n",
       "      <td>99,723,520.0</td>\n",
       "      <td>2533376.0</td>\n",
       "      <td>173056.0</td>\n",
       "      <td>7.08%</td>\n",
       "      <td>2706432.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>features.11</td>\n",
       "      <td>256  13  13</td>\n",
       "      <td>256  13  13</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.17</td>\n",
       "      <td>43,264.0</td>\n",
       "      <td>43,264.0</td>\n",
       "      <td>173056.0</td>\n",
       "      <td>173056.0</td>\n",
       "      <td>0.00%</td>\n",
       "      <td>346112.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>features.12</td>\n",
       "      <td>256  13  13</td>\n",
       "      <td>256   6   6</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.04</td>\n",
       "      <td>73,728.0</td>\n",
       "      <td>43,264.0</td>\n",
       "      <td>173056.0</td>\n",
       "      <td>36864.0</td>\n",
       "      <td>1.41%</td>\n",
       "      <td>209920.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>classifier.0</td>\n",
       "      <td>9216</td>\n",
       "      <td>9216</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.04</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00%</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>classifier.1</td>\n",
       "      <td>9216</td>\n",
       "      <td>4096</td>\n",
       "      <td>37752832.0</td>\n",
       "      <td>0.02</td>\n",
       "      <td>75,493,376.0</td>\n",
       "      <td>37,748,736.0</td>\n",
       "      <td>151048192.0</td>\n",
       "      <td>16384.0</td>\n",
       "      <td>21.12%</td>\n",
       "      <td>151064576.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>classifier.2</td>\n",
       "      <td>4096</td>\n",
       "      <td>4096</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.02</td>\n",
       "      <td>4,096.0</td>\n",
       "      <td>4,096.0</td>\n",
       "      <td>16384.0</td>\n",
       "      <td>16384.0</td>\n",
       "      <td>0.00%</td>\n",
       "      <td>32768.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>classifier.3</td>\n",
       "      <td>4096</td>\n",
       "      <td>4096</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.02</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00%</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>classifier.4</td>\n",
       "      <td>4096</td>\n",
       "      <td>4096</td>\n",
       "      <td>16781312.0</td>\n",
       "      <td>0.02</td>\n",
       "      <td>33,550,336.0</td>\n",
       "      <td>16,777,216.0</td>\n",
       "      <td>67141632.0</td>\n",
       "      <td>16384.0</td>\n",
       "      <td>12.68%</td>\n",
       "      <td>67158016.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>classifier.5</td>\n",
       "      <td>4096</td>\n",
       "      <td>4096</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.02</td>\n",
       "      <td>4,096.0</td>\n",
       "      <td>4,096.0</td>\n",
       "      <td>16384.0</td>\n",
       "      <td>16384.0</td>\n",
       "      <td>1.41%</td>\n",
       "      <td>32768.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>classifier.6</td>\n",
       "      <td>4096</td>\n",
       "      <td>1000</td>\n",
       "      <td>4097000.0</td>\n",
       "      <td>0.00</td>\n",
       "      <td>8,191,000.0</td>\n",
       "      <td>4,096,000.0</td>\n",
       "      <td>16404384.0</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>2.82%</td>\n",
       "      <td>16408384.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>total</th>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>61100840.0</td>\n",
       "      <td>4.15</td>\n",
       "      <td>1,429,567,512.0</td>\n",
       "      <td>715,543,488.0</td>\n",
       "      <td>16404384.0</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>100.00%</td>\n",
       "      <td>253606976.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        module name  input shape output shape      params memory(MB)             MAdd          Flops   MemRead(B)  MemWrite(B) duration[%]    MemR+W(B)\n",
       "0        features.0    3 224 224   64  55  55     23296.0       0.74    140,553,600.0   70,470,400.0     695296.0     774400.0       7.04%    1469696.0\n",
       "1        features.1   64  55  55   64  55  55         0.0       0.74        193,600.0      193,600.0     774400.0     774400.0       2.82%    1548800.0\n",
       "2        features.2   64  55  55   64  27  27         0.0       0.18        373,248.0      193,600.0     774400.0     186624.0       7.03%     961024.0\n",
       "3        features.3   64  27  27  192  27  27    307392.0       0.53    447,897,600.0  224,088,768.0    1416192.0     559872.0      12.67%    1976064.0\n",
       "4        features.4  192  27  27  192  27  27         0.0       0.53        139,968.0      139,968.0     559872.0     559872.0       2.82%    1119744.0\n",
       "5        features.5  192  27  27  192  13  13         0.0       0.12        259,584.0      139,968.0     559872.0     129792.0       5.63%     689664.0\n",
       "6        features.6  192  13  13  384  13  13    663936.0       0.25    224,280,576.0  112,205,184.0    2785536.0     259584.0       5.63%    3045120.0\n",
       "7        features.7  384  13  13  384  13  13         0.0       0.25         64,896.0       64,896.0     259584.0     259584.0       1.41%     519168.0\n",
       "8        features.8  384  13  13  256  13  13    884992.0       0.17    299,040,768.0  149,563,648.0    3799552.0     173056.0       8.44%    3972608.0\n",
       "9        features.9  256  13  13  256  13  13         0.0       0.17         43,264.0       43,264.0     173056.0     173056.0       0.00%     346112.0\n",
       "10      features.10  256  13  13  256  13  13    590080.0       0.17    199,360,512.0   99,723,520.0    2533376.0     173056.0       7.08%    2706432.0\n",
       "11      features.11  256  13  13  256  13  13         0.0       0.17         43,264.0       43,264.0     173056.0     173056.0       0.00%     346112.0\n",
       "12      features.12  256  13  13  256   6   6         0.0       0.04         73,728.0       43,264.0     173056.0      36864.0       1.41%     209920.0\n",
       "13     classifier.0         9216         9216         0.0       0.04              0.0            0.0          0.0          0.0       0.00%          0.0\n",
       "14     classifier.1         9216         4096  37752832.0       0.02     75,493,376.0   37,748,736.0  151048192.0      16384.0      21.12%  151064576.0\n",
       "15     classifier.2         4096         4096         0.0       0.02          4,096.0        4,096.0      16384.0      16384.0       0.00%      32768.0\n",
       "16     classifier.3         4096         4096         0.0       0.02              0.0            0.0          0.0          0.0       0.00%          0.0\n",
       "17     classifier.4         4096         4096  16781312.0       0.02     33,550,336.0   16,777,216.0   67141632.0      16384.0      12.68%   67158016.0\n",
       "18     classifier.5         4096         4096         0.0       0.02          4,096.0        4,096.0      16384.0      16384.0       1.41%      32768.0\n",
       "19     classifier.6         4096         1000   4097000.0       0.00      8,191,000.0    4,096,000.0   16404384.0       4000.0       2.82%   16408384.0\n",
       "total                                          61100840.0       4.15  1,429,567,512.0  715,543,488.0   16404384.0       4000.0     100.00%  253606976.0"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tw.model_stats(alexnet_model, [1, 3, 224, 224])"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
